import React, { Component } from 'react'
import { RecommendWrapper, RecommendItem } from './style'
import { connect } from 'react-redux'

class Recommend extends Component {
  render() {
    let { list } = this.props

    return (
      <RecommendWrapper>
        {list.map((item) => {
          return <RecommendItem key={item.get('id')} imgUrl={item.get('imgUrl')} />
        })}
      </RecommendWrapper>
    )
  }
}
const mapStateToProps = (state) => {
  return {
    list: state.getIn(['home', 'recommendList']),
  }
}
const mapDispatchToProps = {}
export default connect(mapStateToProps, mapDispatchToProps)(Recommend)
